import { driver } from "driver.js";
import { ref } from "vue";
export const useDriver = () => {
  const mydriver = ref(null);
  mydriver.value = driver({
    showProgress: true,
    nextBtnText: "下一步",
    prevBtnText: "上一步",
    doneBtnText: "结束",
    steps: [
      {
        popover: {
          title: "欢迎进入引导",
          description: "此引导将提示你怎么进行操作.",
        },
      },
      {
        element: "#openBtns",
        popover: {
          title: "这是打开按钮",
          description: "点击打开按钮来打开一个md格式的文档",
        },
      },
      {
        element: "#newBtns",
        popover: {
          title: "这是新建按钮",
          description: "点此处来新建一个md文档",
        },
      },
      {
        element: "#editorCont",
        popover: {
          title: "这是编辑区域",
          description: "你将在此处编辑和浏览文件内容",
        },
      },
    ],
  });

  return {
    mydriver,
  };
};
